<template>
	<view v-if="isVerify" class="not-open">
		该功能暂未开通
	</view>
	<view v-else class="main-box">
		<view>
			<image id="form-box" mode="widthFix" class="bg-image" src="https://web.78keji.cn/images/lbkpro/cdtop.png"></image>
			<!-- <view class="mobile-roll-left-box">
				<tuanyou-czqy-roll-left-mobile></tuanyou-czqy-roll-left-mobile>
			</view> -->
			<view class="main-form-box">
				<!-- <xmly-submit-form :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
					:btnImg="imagePath + 'submit-btn.png'"></xmly-submit-form> -->

				<lbk-pro-cdq :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
					:baseImagePath="imagePath" :btnImg="imagePath + 'submit-btn.png'"></lbk-pro-cdq>
			</view>
			<!-- <image mode="widthFix" class="bg-image" :src="imagePath + 'bottom.png'"></image> -->
		</view>


	</view>
</template>

<script>

	import httpUtil from "@/utils/httpUtil";
	import commonApi from "@/api/commonApi";
	import userApi from "@/api/userApi";
	import backMiniApi from "../../api/backMiniApi";
	import logApi from "../../api/logApi";
	import paramApi from "../../api/paramApi";

	export default {
		data() {
			return {
				isVerify: false,
				scrollTop: 0,
				imagePath: 'https://h5.sx2b2c.com/images/shengxin_tingche_mini/zfb/longbao_shengxinka/ljj/',
				scrollToTargetId: "form-box",
				formData: {
					mobile: '',
					param: '',
					submit: 0,
					intervalId: '',
					uid:""
				}
			}
		},
		onLoad(option) {
			this.initData(option)
				my.hideBackHome()
			
				},
						onPageScroll(e) {
							this.scrollTop = e.scrollTop
						},
						methods: {
							uuid() {
							    var s = [];
							    var hexDigits = "0123456789abcdef";
							    for (var i = 0; i < 36; i++) {
							        s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
							    }
							    s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
							    s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
							    s[8] = s[13] = s[18] = s[23] = "-";
							 
							    var uuid = s.join("");
								uni.setStorageSync('uuid', uuid)
							    return uuid;
							},
							initData(option) {
								// option.a = '123aaa'
								// option.param = '123'
								// option.backMiniParam = '123'
								// this.initParam(option)
								backMiniApi.initBackMiniParam(option)
				
								logApi.addLog('lbk-ljj option:' + JSON.stringify(option))
								paramApi.initData(option)
				
								if (!userApi.getUserId()) {
									userApi.initUserId()
								}
				
								if (option.submit) {
									this.formData.submit = option.submit
								}
				
								commonApi.isVerify(res => {
									this.isVerify = res
								})
								commonApi.is404()
							
								
								let paramx = {
									a: httpUtil.getA(),
									proCode:'LH2520',
									uuid:this.uuid()
								}
								// httpUtil.postReturnSource('/api/tongji/tongji0520', paramx)
								httpUtil.post('/api/tongji/tongji0520',paramx,res=>{
									
								})
							},
							initParam(option) {
								if (option.a) {
									httpUtil.setA(option.a)
								}
								if (option.param) {
									userApi.setParam(option.param)
								}
							}
						}
					}
				</script>
				
				<style lang="scss">
					.not-open {
						height: 100vh;
						display: flex;
						justify-content: center;
						align-items: center;
						color: #000;
					}
				
					.main-box {
						background-color: #100220;
						min-height: 100vh;
						padding-bottom: 20rpx;
					}
				
					.main-form-box {
						width: 90%;
						// position: absolute;
						// left: 5%;
						// bottom: 10vh;
						margin: 10rpx auto 0;
					}
				
					.bg-image {
						width: 100%;
						height: auto;
					}
				
					.mobile-roll-left-box {
						position: relative;
						margin-top: -50rpx;
					}
				</style>